<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../static/js/jquery-1.8.2.min.js"></script>
    <link rel="stylesheet" href="../static/css/css.css">
</head>
<body>
[[${bu}]]
<form action="">
        <input type="hidden" name="usersId" th:value="${bu.usersId}">
        用户名:<input type="text" name="userName" th:value="${bu.userName}"><br>
        密码:<input type="text" name="password" th:value="${bu.password}"><br>
        真实姓名:<input type="text" name="trueName" th:value="${bu.trueName}"><br>
        电子邮件:<input type="text" name="email" th:value="${bu.email}"><br>
        联系电话:<input type="text" name="phone" th:value="${bu.phone}"><br>
        备注:<input type="text" name="comments" th:value="${bu.comments}"><br>
        冻结状态:<input type="text" name="lockState" th:value="${bu.lockState}"><br>
        注册日期:<input type="text" name="registerDate" th:value="${bu.registerDate}"><br>
        性别:<input type="text" name="sex" th:value="${bu.sex}"><br>
        爱好:<input type="text" name="love" th:value="${bu.love}"><br>
        <input type="button" th:onclick="update()" th:value="点击进行修改">
</form>
</body>
<script>
    function update(){
        $.post(
            "/basic/update",
            $("form").serialize(),
            function (a) {
                if (a){
                    alert("修改成功")
                    location.href="/basic/select"
                }else{
                    alert("修改失败")
                }
            },"json"
        )
    }

</script>
</html>